<template>
  <div>
    <el-radio-group v-model="radio" size="small" @change="radioChange">
      <el-radio v-for="(item,index) in radioArr" :key="index" :label="item.label">{{ item.text }}</el-radio>
    </el-radio-group>
  </div>
</template>

<script>
export default {
  props: {
    radioArr: {
      type: Array,
      default() {
        return []
      }
    }
  },
  data() {
    return {
      radio: ''
    }
  },
  created() {
    this.radio = this.radioArr[0].label
  },
  methods: {
    radioChange(val) {
      this.$emit('radioVal', val)
    }
  }
}
</script>

<style lang="sass" scoped>

</style>
